﻿<BaseUI:UserControlBase
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	xmlns:System="clr-namespace:System;assembly=mscorlib"
	xmlns:BaseUI="clr-namespace:Silverlight.Weblog.Client.Default.Widgets.BaseUI"
	x:Class="Silverlight.Weblog.Client.Default.Widgets.BusinessCardSiderbarWidget"
	d:DesignWidth="190" Cursor="Hand">

	<Grid x:Name="LayoutRoot" Height="121">
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="PopupStates">
				<VisualStateGroup.Transitions>
					<VisualTransition GeneratedDuration="00:00:00"/>
				</VisualStateGroup.Transitions>
				<VisualState x:Name="Expanded">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(FrameworkElement.Width)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="190">
								<EasingDoubleKeyFrame.EasingFunction>
									<CircleEase EasingMode="EaseInOut"/>
								</EasingDoubleKeyFrame.EasingFunction>
							</EasingDoubleKeyFrame>
							<EasingDoubleKeyFrame KeyTime="00:00:01" Value="413">
								<EasingDoubleKeyFrame.EasingFunction>
									<CircleEase EasingMode="EaseInOut"/>
								</EasingDoubleKeyFrame.EasingFunction>
							</EasingDoubleKeyFrame>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(FrameworkElement.Height)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="121">
								<EasingDoubleKeyFrame.EasingFunction>
									<CircleEase EasingMode="EaseInOut"/>
								</EasingDoubleKeyFrame.EasingFunction>
							</EasingDoubleKeyFrame>
							<EasingDoubleKeyFrame KeyTime="00:00:01" Value="263">
								<EasingDoubleKeyFrame.EasingFunction>
									<CircleEase EasingMode="EaseInOut"/>
								</EasingDoubleKeyFrame.EasingFunction>
							</EasingDoubleKeyFrame>
						</DoubleAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="popup" Storyboard.TargetProperty="(Popup.IsOpen)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>True</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="image" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="Collapsed">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(FrameworkElement.Width)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="413">
								<EasingDoubleKeyFrame.EasingFunction>
									<BackEase EasingMode="EaseOut"/>
								</EasingDoubleKeyFrame.EasingFunction>
							</EasingDoubleKeyFrame>
							<EasingDoubleKeyFrame KeyTime="00:00:01" Value="190">
								<EasingDoubleKeyFrame.EasingFunction>
									<BackEase EasingMode="EaseOut"/>
								</EasingDoubleKeyFrame.EasingFunction>
							</EasingDoubleKeyFrame>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(FrameworkElement.Height)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="263">
								<EasingDoubleKeyFrame.EasingFunction>
									<BackEase EasingMode="EaseOut"/>
								</EasingDoubleKeyFrame.EasingFunction>
							</EasingDoubleKeyFrame>
							<EasingDoubleKeyFrame KeyTime="00:00:01" Value="121">
								<EasingDoubleKeyFrame.EasingFunction>
									<BackEase EasingMode="EaseOut"/>
								</EasingDoubleKeyFrame.EasingFunction>
							</EasingDoubleKeyFrame>
						</DoubleAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="popup" Storyboard.TargetProperty="(Popup.IsOpen)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>True</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
							<DiscreteObjectKeyFrame KeyTime="00:00:01">
								<DiscreteObjectKeyFrame.Value>
									<System:Boolean>False</System:Boolean>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="image" Storyboard.TargetProperty="(UIElement.Visibility)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Collapsed</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
							<DiscreteObjectKeyFrame KeyTime="00:00:01">
								<DiscreteObjectKeyFrame.Value>
									<Visibility>Visible</Visibility>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<Popup x:Name="popup" VerticalAlignment="Bottom" Margin="0" RenderTransformOrigin="0.5,0.5">
			<Popup.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform Y="-121"/>
				</TransformGroup>
			</Popup.RenderTransform>
			<Grid x:Name="grid" Height="121" Width="190" Cursor="Hand">
				<Image Source="BusinessCard.jpg" Stretch="Fill"/>
				<HyperlinkButton HorizontalAlignment="Right" Margin="0,0,14,63" VerticalAlignment="Bottom" NavigateUri="mailto:J@JustinAngel.net" TargetName="">
					<Rectangle Fill="#02FFFFFF" Width="132" Height="20"/>
				</HyperlinkButton>
				<HyperlinkButton HorizontalAlignment="Right" Margin="0,0,14,29" VerticalAlignment="Bottom" NavigateUri="http://twitter.com/JustinAngel" TargetName="_blank">
					<Rectangle Fill="#02FFFFFF" Height="20" Width="173"/>
				</HyperlinkButton>
			</Grid>
		</Popup>
		<Image x:Name="image" Source="BusinessCard.jpg" Stretch="Uniform" Height="121" Width="190"/>
	</Grid>
</BaseUI:UserControlBase>